updating oE keys
keys
include map.e namespace map public function keys(map the_map_p, integer sorted_result = 0)
returns all keys in a map.
Parameters:
- the_map_p: the map being queried
- sorted_result: optional integer. 0 [default] means do not sort the output and 1 means to sort the output before returning.
Returns:
A sequence made of all the keys in the map.
Comments:
If sorted_result is not used, the order of the keys returned is not predicable.
Example 1:
map the_map_p the_map_p = new() put(the_map_p, 10, "ten") put(the_map_p, 20, "twenty") put(the_map_p, 30, "thirty") put(the_map_p, 40, "forty") sequence keys keys = keys(the_map_p) -- keys might be {20,40,10,30} or some other order keys = keys(the_map_p, 1) -- keys will be {10,20,30,40}
See Also:
Not Categorized, Please Help
|